package com.shiguiwu.springmybatis.designpattern.composite.scene.logic;

import com.shiguiwu.springmybatis.designpattern.composite.scene.vo.TreeNodeLink;

import java.util.List;
import java.util.Map;

/**
 * @description: 决策过滤器
 * @author: stone
 * @date: Created by 2021/8/25 22:52
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springmybatis.designpattern.composite.scene.logic
 */
public interface LogicFilter {


    /**
     * 逻辑决策器
     * @param matterValue 决策值
     * @param treeNodeLinkList 决策节点
     * @return 下一个节点id
     */
    Long filter(String matterValue, List<TreeNodeLink> treeNodeLinkList);


    /**
     * 获取决策值
     * @param treeId 规则树id
     * @param userId 用户id
     * @param decisionMatter 决策物料
     * @return 决策值
     */
    String matterValue(Long treeId, String userId, Map<String, String> decisionMatter);
}
